package com.kai.service.wechat.controller;

import com.kai.service.data.request.wechat.CheckRequest;
import com.kai.service.wechat.facade.WechatFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wechat")
public class WechatController {

    @Autowired
    private WechatFacade wechatFacade;

    /**
     * 消息处理
     *
     * @param checkRequest
     * @return
     */
    @RequestMapping("/message")
    public Object messageHandle(CheckRequest checkRequest, @RequestBody(required = false) String messageRequest) {
        return wechatFacade.messageHandle(checkRequest, messageRequest);
    }
}
